# @Version : 1.0
# @Author  : 刘宇
# @File    : 07_float_detail.py
# @Time    : 2025/9/29 14:09

n1 = 4.5
n2 = -3.6
print("n1=", n1)
print("n2=", n2)

# 浮点类型的表示形式
n3 = 5.12
n4 = .512
print("n3=", n3)
print("n4=", n4)

# 科学计数法形式：eg. 5.12e2
n5 = 5.12e2  # 5.12乘以10的2次方
print("n5=", n5)

n6 = 5.12E-2  # 5.12乘以10的2次方
print("n6=", n6)

# b = 8.1 / 3 #2。6666666667
# print("b=", b)

# 导入Decimal 类
from decimal import Decimal

b = Decimal("8.1 ") / Decimal("3")
print("b=", b)  # 2.7
